<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script>
        var jsonobj = {
            "name":"张三",
            "age":20,
            "sex":"男"
        };

        console.log(jsonobj);
        var jsonStr = JSON.stringify(jsonobj);
        jsonobj = JSON.parse(jsonStr);
        console.log(jsonStr);
    </script>
</head>
<body>

</body>
</html>